package com.baizhi.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//药品审核表
public class Exam {
//    eid int primary key auto_increment,
    private Integer eid;
//    exam_status int,-- 审核状态   0 ：未审核    1：审核中   2：审核通过   3：审核未通过
    private Integer exam_status;
//    exam_advice varchar(30),-- 审核意见
    private String exam_advice;
//    exam_start_date date,-- 审核提交时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date exam_start_date;
//    exam_end_date date,-- 审核结束时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date exam_end_date;
//    drugid int(36),
//    foreign key (drugid) references t_drug(drugid)
    private Drug drug;

    public Exam() {
    }

    public Exam(Integer eid, Integer exam_status, String exam_advice, Date exam_start_date, Date exam_end_date, Drug drug) {
        this.eid = eid;
        this.exam_status = exam_status;
        this.exam_advice = exam_advice;
        this.exam_start_date = exam_start_date;
        this.exam_end_date = exam_end_date;
        this.drug = drug;
    }

    public Integer getEid() {
        return eid;
    }

    public void setEid(Integer eid) {
        this.eid = eid;
    }

    public Integer getExam_status() {
        return exam_status;
    }

    public void setExam_status(Integer exam_status) {
        this.exam_status = exam_status;
    }

    public String getExam_advice() {
        return exam_advice;
    }

    public void setExam_advice(String exam_advice) {
        this.exam_advice = exam_advice;
    }

    public Date getExam_start_date() {
        return exam_start_date;
    }

    public void setExam_start_date(Date exam_start_date) {
        this.exam_start_date = exam_start_date;
    }

    public Date getExam_end_date() {
        return exam_end_date;
    }

    public void setExam_end_date(Date exam_end_date) {
        this.exam_end_date = exam_end_date;
    }

    public Drug getDrug() {
        return drug;
    }

    public void setDrug(Drug drug) {
        this.drug = drug;
    }

    @Override
    public String toString() {
        return "Exam{" +
                "eid=" + eid +
                ", exam_status=" + exam_status +
                ", exam_advice='" + exam_advice + '\'' +
                ", exam_start_date=" + exam_start_date +
                ", exam_end_date=" + exam_end_date +
                ", drug=" + drug +
                '}';
    }
}
